package com.atguigu.gmall.pms.vo;

import com.atguigu.gmall.pms.entity.AttrEntity;
import com.atguigu.gmall.pms.entity.SpuAttrValueEntity;
import lombok.Data;
import org.apache.commons.lang.StringUtils;
import org.springframework.util.CollectionUtils;

import java.util.List;

/**
 * @Description:
 * @Author: your name
 * @Date: 2022/6/28 1:46
 */
//@Data
public class SpuAttrValueVo extends SpuAttrValueEntity {

    // 最终选择的值列表
    // private List<String> valueSelected;

    public void setValueSelected(List<String> valueSelected) {
        //this.valueSelected = valueSelected;
        if (CollectionUtils.isEmpty(valueSelected)){
            return;
        }
        this.setAttrValue(StringUtils.join(valueSelected, ","));
    }
}
